# coding:utf-8
import requests
import time
import os
import re
# url="https://a.jd.com/indexAjax/getCoupon.html?callback=jQuery207838&key=0271DFD6890D3B60ACB8BA8A9E49BEB1B83B978807309F727C3B78E5B5F3EC22296929D69238E395BD562F1C693BD8598EFD78F37DBA4C6FC04C1CACA16451A9EAC0978F751296E56A044C429D8BF9681A2FE01B2CC05DF2E47571763B0CFBB714E2BB90617C424417E330EEBDF34434DD4C499770D829D0C612840B1448D95070567A0CB61613EAC7B85D66BD2DD2B9&type=1&_=1636628637037"
def get_ck():
    cookie = {}
    ck = []
    for root, dirs, files in os.walk('./testText1'):
        print(root)
        print(dirs)
        print(files)
        for file in files:
            phone = file.split('.')[0]
            with open('./testText1/'+file, 'r',encoding="utf-8") as f:
                for i in f.readlines():
                    mobile = i.split('----')[0]
                    oo = mobile.split(';')
                    for ooo in oo:
                        oooo = ooo.strip().split('=')
                        cookie[oooo[0]] = oooo[1]
                    ck.append((phone, cookie))
                    cookie = {}
    return ck
aaaa=get_ck();
print(aaaa)

keyss=[]
strss='jQuery5075641({"totalNum":1,"success":true,"couponList":[{"beanGet":0,"riskLevel":null,"todayStart":null,"labelText":null,"discount":false,"batchId":"822096434","batchCount":0,"ruleKey":"0271DFD6890D3B60ACB8BA8A9E49BEB11D1BBEB67679D74F86D799C478856A339836D6037DD8F7AAB73152D287D7FDD741CBC84EE9DF80C904CEEC12C7F64545A90713972C47406527E4E1C127F34E51689674EAB6AF39AF09B6B894189904FC4F88F52180C2D0F4992846E22AC7896ADD9235E21AD499B3BAE4A869995B5964D25651973D8398364879AEDB53DF0968","jumpUrl":"//search.jd.com/Search?coupon_batch=822096434","denomination":"15","remindPeople":null,"couponTag":0,"rate":0,"todayEnd":null,"quota":"满16元可用","leftTime":null,"operateWord":null,"startTime":null,"id":1,"shopId":null,"totalBean":null,"ynTop":0,"limitStr":"仅可购买家装软饰部分商品","key":"0271DFD6890D3B60ACB8BA8A9E49BEB11D1BBEB67679D74F86D799C478856A339836D6037DD8F7AAB73152D287D7FDD741CBC84EE9DF80C904CEEC12C7F64545A90713972C47406527E4E1C127F34E51689674EAB6AF39AF09B6B894189904FC4F88F52180C2D0F4992846E22AC7896ADD9235E21AD499B3BAE4A869995B5964D25651973D8398364879AEDB53DF0968","overlying":true,"ynPlus":false,"dongOverlapText":"可与店铺东券叠加使用","roleId":"63478288","discountDetailText":"","extendInfo":{"1":"","2":"1","3":"3","4":"zhangbowei1","5":"1","6":"2","7":"2","8":"[]","9":"oa-95fdd4c4-41e1-11ec-b451-fa163ea0d485","10":"1","11":"5","12":"-1","13":"1","14":"[\"CN\"]","15":"[1]","16":"[{\"name\":\"全部\",\"id\":\"ALL\"}]","17":"[\"ALL\"]","18":"[5]","19":"","20":"0.8","21":"","23":"{\"zh_CN\":\"仅可购买家装软饰部分商品\"}","25":"3","26":"0.8","27":"00038943","28":"00000843","29":"00087271","31":"0","32":"0","49":"1","54":"","57":"","58":"0","59":"","60":"","61":"","62":"","63":"","64":"","65":"1","66":"","67":"","68":"","69":"","70":"","71":"","72":"1","73":"mashushan;","74":"","75":"0","76":"常规","77":"{\"template\":\"fix\",\"create\":\"\"}","78":"","79":"2_2005;3_8019;","81":"","82":""},"labelColor":null,"receiveUrl":null,"sortType":1,"needBean":null,"receiveFlag":0,"beijingPost":false,"endTime":null,"jumpFlag":0,"position":null,"successLabel":null,"ynLabel":null,"couponImg":"https://m.360buyimg.com/common/s310x310_jfs/t1/175443/25/13579/154040/60bf217fEf085a95c/7e26d5fe40d03ed4.jpg.dpg","couponSortId":1},{"beanGet":0,"riskLevel":null,"todayStart":null,"labelText":null,"discount":false,"batchId":"817625430","batchCount":0,"ruleKey":"0271DFD6890D3B60ACB8BA8A9E49BEB11D1BBEB67679D74F86D799C478856A339836D6037DD8F7AAB73152D287D7FDD7D6C7AD56C69A3F67D8B0906DFE10CA61860EB08CF9B478430C332FE660D4D8BE689674EAB6AF39AF09B6B894189904FC76E8010C0CD7A694D046812E5F24E862B3972703C69FE0548C7BB511819DC5E828E8C65D91D00BEF744E6FB47F00EA1F","jumpUrl":"//search.jd.com/Search?coupon_batch=817625430","denomination":"2","remindPeople":null,"couponTag":0,"rate":0,"todayEnd":null,"quota":"满3元可用","leftTime":null,"operateWord":null,"startTime":null,"id":1,"shopId":null,"totalBean":null,"ynTop":0,"limitStr":"仅可购买部分商品","key":"0271DFD6890D3B60ACB8BA8A9E49BEB11D1BBEB67679D74F86D799C478856A339836D6037DD8F7AAB73152D287D7FDD7D6C7AD56C69A3F67D8B0906DFE10CA61860EB08CF9B478430C332FE660D4D8BE689674EAB6AF39AF09B6B894189904FC76E8010C0CD7A694D046812E5F24E862B3972703C69FE0548C7BB511819DC5E828E8C65D91D00BEF744E6FB47F00EA1F","overlying":false,"ynPlus":false,"dongOverlapText":"","roleId":"62105874","discountDetailText":"","extendInfo":{"1":"","2":"1","3":"2","4":"lixuanhong1","5":"1","6":"2","7":"2","8":"[]","9":"oa-114e3d29-325d-11ec-b451-fa163ea0d485","10":"1","11":"5","12":"-1","13":"1","14":"[\"CN\"]","15":"[2]","16":"[{\"name\":\"京东商城\",\"id\":\"JD\"}]","17":"[\"ALL\"]","18":"[]","19":"","20":"0.0","21":"","23":"{\"zh_CN\":\"仅可购买部分商品\"}","25":"2","26":"0.0","27":"00067706","28":"00097928","29":"00018815","31":"112","32":"0","49":"1","54":"","57":"","58":"0","59":"","60":"","61":"","62":"","63":"","64":"","65":"1","66":"","67":"","68":"","69":"","70":"","71":"","72":"1","73":"lixuanhong1;","74":"","75":"0","76":"常规","77":"{\"template\":\"official_25\",\"create\":\"\"}","78":"","79":"","81":"","82":""},"labelColor":null,"receiveUrl":null,"sortType":1,"needBean":null,"receiveFlag":0,"beijingPost":false,"endTime":null,"jumpFlag":0,"position":null,"successLabel":null,"ynLabel":null,"couponImg":"https://m.360buyimg.com/common/s310x310_jfs/t1/221936/19/2104/169703/618b9355Ee591c7af/782fa15604ca08a1.jpg.dpg","couponSortId":1},{"beanGet":0,"riskLevel":null,"todayStart":null,"labelText":null,"discount":true,"batchId":"821138134","batchCount":0,"ruleKey":"BFA7D5C592D9A8E339B72B3410CDBAE91D1BBEB67679D74F86D799C478856A339836D6037DD8F7AAB73152D287D7FDD7D6C7AD56C69A3F67D8B0906DFE10CA61A92D59B34812EBD877F74E7FE8406817689674EAB6AF39AF09B6B894189904FC757D566841406C4D190A727425EDA71C9FB040386D2A1DFA5142AA9BFA96255B3008E0A05B4C3AD5E9A59A5015CCBEB5","jumpUrl":"//search.jd.com/Search?coupon_batch=821138134","denomination":"5折","remindPeople":null,"couponTag":0,"rate":0,"todayEnd":null,"quota":"满1元可用","leftTime":null,"operateWord":null,"startTime":null,"id":1,"shopId":null,"totalBean":null,"ynTop":0,"limitStr":"仅可购买京东京造部分商品","key":"BFA7D5C592D9A8E339B72B3410CDBAE91D1BBEB67679D74F86D799C478856A339836D6037DD8F7AAB73152D287D7FDD7D6C7AD56C69A3F67D8B0906DFE10CA61A92D59B34812EBD877F74E7FE8406817689674EAB6AF39AF09B6B894189904FC757D566841406C4D190A727425EDA71C9FB040386D2A1DFA5142AA9BFA96255B3008E0A05B4C3AD5E9A59A5015CCBEB5","overlying":false,"ynPlus":true,"dongOverlapText":"","roleId":"62985922","discountDetailText":"满1享5折，最多减￥1000元","extendInfo":{"1":"","2":"1","3":"1","4":"zhaoshuang49","5":"1","6":"2","7":"2","8":"[]","9":"oa-39034b2e-3d5e-11ec-a787-fa163eb1cb31","10":"1","11":"5","12":"-1","13":"1","14":"[\"CN\"]","15":"[1]","16":"[{\"name\":\"全部\",\"id\":\"ALL\"}]","17":"[\"ALL\"]","18":"[]","19":"{\"high\":\"1000\",\"info\":[{\"quota\":\"1\",\"discount\":\"0.5\"}]}","20":"1.0","21":"","23":"{\"zh_CN\":\"仅可购买京东京造部分商品\"}","25":"1","26":"1.0","27":"00049166","28":"00032285","29":"00035568","31":"100-1","32":"0","49":"1","54":"","57":"","58":"0","59":"","60":"","61":"","62":"","63":"","64":"","65":"1","66":"","67":"","68":"","69":"","70":"","71":"","72":"1","73":"zhaoshuang49;","74":"","75":"0","76":"常规","77":"{\"template\":\"fix\",\"create\":\"\"}","78":"","79":"3_8019;","81":"","82":""},"labelColor":null,"receiveUrl":null,"sortType":1,"needBean":null,"receiveFlag":0,"beijingPost":false,"endTime":null,"jumpFlag":0,"position":null,"successLabel":null,"ynLabel":null,"couponImg":"https://m.360buyimg.com/common/s310x310_jfs/t1/221930/29/1953/106352/618a3848E48930b94/b5f5919462a2c051.jpg.dpg","couponSortId":1},{"beanGet":0,"riskLevel":null,"todayStart":null,"labelText":null,"discount":false,"batchId":"817162286","batchCount":0,"ruleKey":"0271DFD6890D3B60ACB8BA8A9E49BEB11D1BBEB67679D74F86D799C478856A339836D6037DD8F7AAB73152D287D7FDD7D6C7AD56C69A3F67D8B0906DFE10CA61FD49849C669F13795AA500619D9D1F11689674EAB6AF39AF09B6B894189904FCF2F3CAB651455CEE159837772565FEC6E34E993CE97E65C4AE960DF36F40822E4E8DA1D3ADED82AD25C857D8AA21CBDD","jumpUrl":"//search.jd.com/Search?coupon_batch=817162286","denomination":"100","remindPeople":null,"couponTag":0,"rate":0,"todayEnd":null,"quota":"满149元可用","leftTime":null,"operateWord":null,"startTime":null,"id":1,"shopId":null,"totalBean":null,"ynTop":0,"limitStr":"仅可购买个人护理部分商品","key":"0271DFD6890D3B60ACB8BA8A9E49BEB11D1BBEB67679D74F86D799C478856A339836D6037DD8F7AAB73152D287D7FDD7D6C7AD56C69A3F67D8B0906DFE10CA61FD49849C669F13795AA500619D9D1F11689674EAB6AF39AF09B6B894189904FCF2F3CAB651455CEE159837772565FEC6E34E993CE97E65C4AE960DF36F40822E4E8DA1D3ADED82AD25C857D8AA21CBDD","overlying":false,"ynPlus":false,"dongOverlapText":"","roleId":"62245398","discountDetailText":"","extendInfo":{"1":"","2":"1","3":"2","4":"bjhuangbaoying","5":"1","6":"2","7":"2","8":"[\"bjliulizhen\",\"wangtao241\"]","9":"oa-ae365f89-3574-11ec-98c2-fa163e66241c","10":"1","11":"5","12":"-1","13":"1","14":"[\"CN\"]","15":"[1]","16":"[{\"name\":\"全部\",\"id\":\"ALL\"}]","17":"[\"ALL\"]","18":"[]","19":"","20":"0.0","21":"","23":"{\"zh_CN\":\"仅可购买个人护理部分商品\"}","25":"2","26":"0.0","27":"00067706","28":"00097929","29":"00026707","31":"0","32":"0","49":"1","54":"","57":"","58":"0","59":"","60":"","61":"","62":"","63":"","64":"","65":"1","66":"","67":"","68":"","69":"","70":"","71":"","72":"0","73":"bjhuangbaoying;","74":"","75":"0","76":"常规","77":"{\"template\":\"fix\",\"create\":\"\"}","78":"","79":"","81":"","82":""},"labelColor":null,"receiveUrl":null,"sortType":1,"needBean":null,"receiveFlag":0,"beijingPost":false,"endTime":null,"jumpFlag":0,"position":null,"successLabel":null,"ynLabel":null,"couponImg":"https://m.360buyimg.com/common/s310x310_jfs/t1/200076/11/15497/199516/617fb0b5Ecf71dabb/19631e802ca43fb2.jpg.dpg","couponSortId":1},{"beanGet":0,"riskLevel":null,"todayStart":null,"labelText":null,"discount":false,"batchId":"818116218","batchCount":0,"ruleKey":"0271DFD6890D3B60ACB8BA8A9E49BEB11D1BBEB67679D74F86D799C478856A339836D6037DD8F7AAB73152D287D7FDD7D6C7AD56C69A3F67D8B0906DFE10CA6162596DD2E68A25E73C436C852BA7F957689674EAB6AF39AF09B6B894189904FCCBAF44165F001E97E45BD0E276FDCC26666FEBDEBFD59F0F03AE738A5D109201AB4614EC49F092A271EA038DE0544629","jumpUrl":"//search.jd.com/Search?coupon_batch=818116218","denomination":"10","remindPeople":null,"couponTag":0,"rate":0,"todayEnd":null,"quota":"满11元可用","leftTime":null,"operateWord":null,"startTime":null,"id":1,"shopId":null,"totalBean":null,"ynTop":0,"limitStr":"仅可购买三只松鼠部分商品","key":"0271DFD6890D3B60ACB8BA8A9E49BEB11D1BBEB67679D74F86D799C478856A339836D6037DD8F7AAB73152D287D7FDD7D6C7AD56C69A3F67D8B0906DFE10CA6162596DD2E68A25E73C436C852BA7F957689674EAB6AF39AF09B6B894189904FCCBAF44165F001E97E45BD0E276FDCC26666FEBDEBFD59F0F03AE738A5D109201AB4614EC49F092A271EA038DE0544629","overlying":false,"ynPlus":false,"dongOverlapText":"","roleId":"62582192","discountDetailText":"","extendInfo":{"1":"","2":"1","3":"2","4":"szss","5":"4","6":"2","7":"2","8":"[]","9":"oa-e24152e0-362e-11ec-a787-fa163eb1cb31","10":"1","11":"5","12":"-1","13":"1","14":"[\"CN\"]","15":"[2]","16":"[{\"id\":\"JD\",\"name\":\"京东商城\"}]","17":"[\"ALL\"]","18":"[]","19":"","20":"0.0","21":"","23":"{\"zh_CN\":\"仅可购买三只松鼠部分商品\"}","25":"2","26":"0.0","27":"","28":"","29":"","31":"112","32":"","49":"1","54":"","57":"","58":"0","59":"","60":"","61":"","62":"","63":"","64":"","65":"","66":"","67":"","68":"","69":"","70":"","71":"","72":"1","73":"","74":"","75":"","76":"","77":"","78":"","79":"","81":"","82":""},"labelColor":null,"receiveUrl":null,"sortType":1,"needBean":null,"receiveFlag":0,"beijingPost":false,"endTime":null,"jumpFlag":0,"position":null,"successLabel":null,"ynLabel":null,"couponImg":"https://m.360buyimg.com/common/s310x310_jfs/t1/209292/4/8707/198974/618a26e0Ecd78b997/0c71521157b9d08d.jpg.dpg","couponSortId":1},{"beanGet":0,"riskLevel":null,"todayStart":null,"labelText":null,"discount":false,"batchId":"817623898","batchCount":0,"ruleKey":"0271DFD6890D3B60ACB8BA8A9E49BEB11D1BBEB67679D74F86D799C478856A339836D6037DD8F7AAB73152D287D7FDD7394EA503388C4F8079B32F0434D77DD8073E1FB2153A183C8E00111BDF1F1D42689674EAB6AF39AF09B6B894189904FC1EA51EAC7CE42887C5A1E1BF7E4983DF610FF57A048469F9481842657370BFC0CAF2BDBBCB634B94913146D5875AE335","jumpUrl":"//search.jd.com/Search?coupon_batch=817623898","denomination":"10","remindPeople":null,"couponTag":0,"rate":0,"todayEnd":null,"quota":"满19元可用","leftTime":null,"operateWord":null,"startTime":null,"id":1,"shopId":null,"totalBean":null,"ynTop":0,"limitStr":"仅可购买南北干货部分商品","key":"0271DFD6890D3B60ACB8BA8A9E49BEB11D1BBEB67679D74F86D799C478856A339836D6037DD8F7AAB73152D287D7FDD7394EA503388C4F8079B32F0434D77DD8073E1FB2153A183C8E00111BDF1F1D42689674EAB6AF39AF09B6B894189904FC1EA51EAC7CE42887C5A1E1BF7E4983DF610FF57A048469F9481842657370BFC0CAF2BDBBCB634B94913146D5875AE335","overlying":false,"ynPlus":false,"dongOverlapText":"","roleId":"61871417","discountDetailText":"","extendInfo":{"1":"","2":"1","3":"2","4":"wenqing1","5":"1","6":"2","7":"2","8":"[]","9":"oa-2a77a42d-3257-11ec-98c2-fa163e66241c","10":"1","11":"5","12":"-1","13":"1","14":"[\"CN\"]","15":"[1]","16":"[{\"name\":\"全部\",\"id\":\"ALL\"}]","17":"[\"ALL\"]","18":"[]","19":"","20":"0.0","21":"","23":"{\"zh_CN\":\"仅可购买南北干货部分商品\"}","25":"2","26":"0.0","27":"00067706","28":"00097928","29":"00018815","30":"959802","31":"0","32":"0","49":"1","54":"","57":"18","58":"0","59":"","60":"","61":"","62":"","63":"","64":"","65":"1","66":"","67":"","68":"","69":"","70":"","71":"","72":"1","73":"wenqing1;","74":"","75":"0","76":"常规","77":"{\"template\":\"fix\",\"create\":\"#continueBtn#\"}","78":"","79":"2_4200;3_8019;","81":"0","82":""},"labelColor":null,"receiveUrl":null,"sortType":1,"needBean":null,"receiveFlag":0,"beijingPost":false,"endTime":null,"jumpFlag":0,"position":null,"successLabel":null,"ynLabel":null,"couponImg":"https://m.360buyimg.com/common/s310x310_jfs/t1/141251/29/22678/100253/618b7e4fEfb3169ac/12ca4df2e524958e.jpg.dpg","couponSortId":1},{"beanGet":0,"riskLevel":null,"todayStart":null,"labelText":null,"discount":false,"batchId":"817649806","batchCount":0,"ruleKey":"0271DFD6890D3B60ACB8BA8A9E49BEB11D1BBEB67679D74F86D799C478856A339836D6037DD8F7AAB73152D287D7FDD7D6C7AD56C69A3F67D8B0906DFE10CA6114A3EDF5BC66B195328776D086E55C3E689674EAB6AF39AF09B6B894189904FC3449C8E82399B1E803C1189ED08B71FE602528300A7AC2B807F01AF67FDE12C83D3B604742A0927CFDC8A5ECE46BF8AA","jumpUrl":"//search.jd.com/Search?coupon_batch=817649806","denomination":"220","remindPeople":null,"couponTag":0,"rate":0,"todayEnd":null,"quota":"满300元可用","leftTime":null,"operateWord":null,"startTime":null,"id":1,"shopId":null,"totalBean":null,"ynTop":0,"limitStr":"仅可购买部分良品铺子商品","key":"0271DFD6890D3B60ACB8BA8A9E49BEB11D1BBEB67679D74F86D799C478856A339836D6037DD8F7AAB73152D287D7FDD7D6C7AD56C69A3F67D8B0906DFE10CA6114A3EDF5BC66B195328776D086E55C3E689674EAB6AF39AF09B6B894189904FC3449C8E82399B1E803C1189ED08B71FE602528300A7AC2B807F01AF67FDE12C83D3B604742A0927CFDC8A5ECE46BF8AA","overlying":false,"ynPlus":false,"dongOverlapText":"","roleId":"62058807","discountDetailText":"","extendInfo":{"1":"","2":"1","3":"2","4":"lisiyao8","5":"1","6":"2","7":"2","8":"[]","9":"oa-92da6986-32fb-11ec-a0a2-fa163e70711b","10":"1","11":"5","12":"-1","13":"1","14":"[\"CN\"]","15":"[1]","16":"[{\"name\":\"全部\",\"id\":\"ALL\"}]","17":"[\"ALL\"]","18":"[]","19":"","20":"0.0","21":"","23":"{\"zh_CN\":\"仅可购买部分良品铺子商品\"}","25":"2","26":"0.0","27":"00067706","28":"00097928","29":"00018815","31":"0","32":"0","49":"1","54":"","57":"","58":"0","59":"","60":"","61":"","62":"","63":"","64":"","65":"1","66":"","67":"","68":"","69":"","70":"","71":"","72":"1","73":"lisiyao8;","74":"","75":"0","76":"常规","77":"{\"template\":\"fix\",\"create\":\"\"}","78":"","79":"","81":"","82":""},"labelColor":null,"receiveUrl":null,"sortType":1,"needBean":null,"receiveFlag":0,"beijingPost":false,"endTime":null,"jumpFlag":0,"position":null,"successLabel":null,"ynLabel":null,"couponImg":"https://m.360buyimg.com/common/s310x310_jfs/t1/161823/39/28297/184851/618bab99Ebdcca0ea/ae599a205015af2a.jpg.dpg","couponSortId":1},{"beanGet":0,"riskLevel":null,"todayStart":null,"labelText":null,"discount":false,"batchId":"794834867","batchCount":0,"ruleKey":"0271DFD6890D3B60ACB8BA8A9E49BEB11D1BBEB67679D74F86D799C478856A339836D6037DD8F7AAB73152D287D7FDD7D6C7AD56C69A3F67D8B0906DFE10CA61288FF81D79D34381C2DEB8C89D149465689674EAB6AF39AF09B6B894189904FC21800720F5F9D09A86AFD01EC1D8D22BF3A39B6F20E9DCBEDE02330FC1C3300E089B102D49761F318EED3B8FF38A6D3D","jumpUrl":"//search.jd.com/Search?coupon_batch=794834867","denomination":"120","remindPeople":null,"couponTag":0,"rate":0,"todayEnd":null,"quota":"满199元可用","leftTime":null,"operateWord":null,"startTime":null,"id":1,"shopId":null,"totalBean":null,"ynTop":0,"limitStr":"仅可购买跨店铺活动商品","key":"0271DFD6890D3B60ACB8BA8A9E49BEB11D1BBEB67679D74F86D799C478856A339836D6037DD8F7AAB73152D287D7FDD7D6C7AD56C69A3F67D8B0906DFE10CA61288FF81D79D34381C2DEB8C89D149465689674EAB6AF39AF09B6B894189904FC21800720F5F9D09A86AFD01EC1D8D22BF3A39B6F20E9DCBEDE02330FC1C3300E089B102D49761F318EED3B8FF38A6D3D","overlying":false,"ynPlus":false,"dongOverlapText":"","roleId":"62442204","discountDetailText":"","extendInfo":{"1":"","2":"2","3":"2","4":"POP活动无来源信息","5":"3","6":"2","7":"2","8":"","9":"","10":"1","11":"5","12":"-1","13":"10","14":"[\"CN\"]","15":"[1]","16":"[{\"id\":\"ALL\",\"name\":\"全部\"}]","17":"[\"ALL\"]","18":"[]","19":"","20":"","21":"","23":"{\"zh_CN\":\"仅可购买跨店铺活动商品\"}","27":"","28":"","29":"","31":"","32":"","49":"1","54":"","57":"","58":"0","59":"","60":"","61":"","62":"","63":"","64":"","65":"","66":"1","67":"","68":"","69":"","70":"","71":"","72":"","73":"","74":"","75":"","76":"","77":"","78":"","79":"","81":"","82":""},"labelColor":null,"receiveUrl":null,"sortType":1,"needBean":null,"receiveFlag":0,"beijingPost":false,"endTime":null,"jumpFlag":0,"position":null,"successLabel":null,"ynLabel":null,"couponImg":"https://m.360buyimg.com/common/s310x310_jfs/t1/198830/19/16670/268428/618ccf02Ea6e0792e/00767f722ee7ee0b.jpg.dpg","couponSortId":1},{"beanGet":0,"riskLevel":null,"todayStart":null,"labelText":null,"discount":false,"batchId":"821971414","batchCount":0,"ruleKey":"0271DFD6890D3B60ACB8BA8A9E49BEB11D1BBEB67679D74F86D799C478856A339836D6037DD8F7AAB73152D287D7FDD741CBC84EE9DF80C904CEEC12C7F64545AD149D8447BD863753D742B1B4249093689674EAB6AF39AF09B6B894189904FC446DF36D3A7E65154D8FCFC20F2899717640583FDD028C23CD7680CBD407417F522C5C632708AFA64A7992313DFDD44A","jumpUrl":"//search.jd.com/Search?coupon_batch=821971414","denomination":"150","remindPeople":null,"couponTag":0,"rate":0,"todayEnd":null,"quota":"满299元可用","leftTime":null,"operateWord":null,"startTime":null,"id":1,"shopId":null,"totalBean":null,"ynTop":0,"limitStr":"仅可购买生鲜部分商品","key":"0271DFD6890D3B60ACB8BA8A9E49BEB11D1BBEB67679D74F86D799C478856A339836D6037DD8F7AAB73152D287D7FDD741CBC84EE9DF80C904CEEC12C7F64545AD149D8447BD863753D742B1B4249093689674EAB6AF39AF09B6B894189904FC446DF36D3A7E65154D8FCFC20F2899717640583FDD028C23CD7680CBD407417F522C5C632708AFA64A7992313DFDD44A","overlying":false,"ynPlus":false,"dongOverlapText":"","roleId":"63355137","discountDetailText":"","extendInfo":{"1":"","2":"1","3":"2","4":"beijie.cao","5":"1","6":"2","7":"2","8":"[\"bjyw\"]","9":"oa-ec7a696a-4135-11ec-a0a2-fa163e70711b","10":"2","11":"5","12":"-1","13":"1","14":"[\"CN\"]","15":"[2]","16":"[{\"name\":\"京东商城\",\"id\":\"JD\"}]","17":"[\"ALL\"]","18":"[]","19":"","20":"0.0","21":"","23":"{\"zh_CN\":\"仅可购买生鲜部分商品\"}","25":"1","26":"1.0","27":"00067706","28":"00067951","29":"00087340","31":"0","32":"0","49":"1","54":"","57":"","58":"0","59":"","60":"","61":"","62":"","63":"","64":"","65":"1","66":"","67":"","68":"","69":"","70":"","71":"","72":"1","73":"","74":"","75":"0","76":"常规","77":"{\"template\":\"fix\",\"create\":\"\"}","78":"","79":"","81":"","82":""},"labelColor":null,"receiveUrl":null,"sortType":1,"needBean":null,"receiveFlag":0,"beijingPost":false,"endTime":null,"jumpFlag":0,"position":null,"successLabel":null,"ynLabel":null,"couponImg":"https://m.360buyimg.com/common/s310x310_jfs/t1/164785/24/26623/128528/618b9fabEd86823a7/2d59c265d15e46c5.jpg.dpg","couponSortId":1}],"resultCode":"200","message":"获取数据信息成功"})'
# patt=re.compile('"key":"(.*?)"')
patt=re.compile('"key":"(.*?)"')
str12=patt.findall(strss)

print(str12[0])
for i in str12:
    print(i)
    url = "https://a.jd.com/indexAjax/getCoupon.html?callback=jQuery5075641&key={}&type=1&_=1636637515171".format(i)
    print(url)
    headers={"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36 Edg/95.0.1020.44",
             'referer': 'https://a.jd.com/'}
    # cookies={"shshshfpa=b44175ac-3939-1d01-7ff0-e99c333b66c1-1632493104; shshshfpb=pXRg5CxLnKVgXgqowLECcbw%3D%3D; __jdu=1632492871596878552745; user-key=3bfa5cfd-5ac5-4ae4-acf3-de707386d87a; ipLoc-djd=21-1836-1840-0; areaId=21; pinId=CUvO4tx8wdO3UI6K2w4phA; pin=wdauuVmDIgzLNl; unick=auuVmDIgzLNl; _tp=PI4%2FOePP%2FScOrPjxzDzSwg%3D%3D; _pst=wdauuVmDIgzLNl; PCSYCityID=CN_360000_360300_360323; mt_xid=V2_52007VwMVUF5dWlkWTxlYDWAKFFtZXFFcGk0pXFAwVBBWWA1OXU0eTUAAYQUXTg4NVl0DQBpYBmFRGgBaClNbL0oYXwV7AxJOXVlDWRxCHF0OZgQiUG1YYlgYSRhYA2YGF1ptWlZbGw%3D%3D; unpl=V2_ZzNtbUQFEUclARNWehEMBGIKQg4SAkAddwkSBC8RDlFgBBJaclRCFnUURlRnGVwUZwMZXURcQBJFCEdkeBBVAWMDE1VGZxBFLV0CFSNGF1wjU00zQwBBQHcJFF0uSgwDYgcaDhFTQEJ2XBVQL0oMDDdRFAhyZ0AVRQhHZHseXgZiCxFURFdHHXIBQF1%2fHV8DYgcibUVncyVyAEBTfBhsBFcCIh8WC0QTdglHUjYZWwdkBhpeS1FDEX0PT1JyHVgGYQYWbUNnQA%3d%3d; __jdv=76161171|baidu-pinzhuan|t_288551095_baidupinzhuan|cpc|0f3d30c8dba7459bb52f2eb5eba8ac7d_0_7ccca8d309a048abad2930eae9ce6616|1636600646068; TrackID=1Q7q_T-fDSWe4QznYHfx8WpsgrePIIeLQWFb4Qd-3rNcTH1TU4K_2aO0REtuRpLzykcE61Z8rVGCkte53UMieaX0vlMvnbAxyia7YCf1yejw; ceshi3.com=000; __jda=122270672.1632492871596878552745.1632492871.1636613323.1636622269.31; __jdc=122270672; JSESSIONID=74A7AA6660D3FB7D9548CA015EF3A20C.s1; wlfstk_smdl=1c5is7wkjdfo5u2jfnqjjlaki09x49j5; shshshfp=df17302b4e37944121c507309c9e93ae; thor=C0816B53F25D573C693A2F91D470DE7B51AFBC3736616296E570E1666ECB86D8C62751EDEFBFB4A586B140F3AB582A9189ECA484C80E0E0747538EB191678AFAF8F20BF5968BB3303BC314C6CE7D92271503952CAFBC9A36DCB49039BCCD20CC830290B81CD01DACCEF03EE3C5E6040B50CAB152BEEB0338E06E0494EC53969D5D7C483D05DE4D705AAE3B0D2FBC9D5F; '__jdb':'122270672.49.1632492871596878552745|31.1636622269', "shshshsID":"f329b70f0082081fb86445a3c71a781f_2_1636628314828", "3AB9D23F7A4B3C9B":"C2BG5PVL56JTAF6W5X6KC3I7FL3VNG3UOGVNG5JWAOQOIRRCFYAJEF544M75EAYGUOTEDMOL7YDV2TFSESHASECKW4"}
    response=requests.get(url,headers=headers,cookies=aaaa[0][1])

    print(response.text)
    time.sleep(1)